import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [

    //以下是专业课详情页


    {
        path: '/courseDetail/1',
        component: () =>
            import('@/views/courseDetail/one.vue'),
    },
    {
        path: '/courseDetail/2',
        component: () =>
            import('@/views/courseDetail/two.vue'),
    },
    {
        path: '/courseDetail/3',
        component: () =>
            import('@/views/courseDetail/three.vue'),
    },
    {
        path: '/courseDetail/4',
        component: () =>
            import('@/views/courseDetail/four.vue'),
    },
    {
        path: '/courseDetail/5',
        component: () =>
            import('@/views/courseDetail/five.vue'),
    },
    {
        path: '/courseDetail/6',
        component: () =>
            import('@/views/courseDetail/six.vue'),
    },
    {
        path: '/courseDetail/7',
        component: () =>
            import('@/views/courseDetail/seven.vue'),
    },
    {
        path: '/courseDetail/8',
        component: () =>
            import('@/views/courseDetail/eight.vue'),
    },
    {
        path: '/courseDetail/9',
        component: () =>
            import('@/views/courseDetail/nine.vue'),
    },
    {
        path: '/courseDetail/10',
        component: () =>
            import('@/views/courseDetail/ten.vue'),
    },
    {
        path: '/courseDetail/11',
        component: () =>
            import('@/views/courseDetail/eleven.vue'),
    },
    {
        path: '/courseDetail/12',
        component: () =>
            import('@/views/courseDetail/twelve.vue'),
    },
    {
        path: '/courseDetail/13',
        component: () =>
            import('@/views/courseDetail/thirteen.vue'),
    },
    {
        path: '/courseDetail/14',
        component: () =>
            import('@/views/courseDetail/fourteen.vue'),
    },
    {
        path: '/courseDetail/15',
        component: () =>
            import('@/views/courseDetail/fifteen.vue'),
    },
    {
        path: '/courseDetail/16',
        component: () =>
            import('@/views/courseDetail/sixteen.vue'),
    },
    {
        path: '/courseDetail/17',
        component: () =>
            import('@/views/courseDetail/seventeen.vue'),

    },
    {
        path: '/courseDetail/18',
        component: () =>
            import('@/views/courseDetail/eighteen.vue'),
    },
    {
        path: '/courseDetail/19',
        component: () =>
            import('@/views/courseDetail/nineteen.vue'),
    },
    //以上是专业课详情页

    {
        path: '/',
        name: 'homeZ',
        component: () =>
            import('@/views/ZViews/home/home.vue')
    },
    {
        path: '/courseZ',
        name: 'courseZ',
        component: () =>
            import('@/views/ZViews/course/course.vue')
    },
    {
        path: '/courseInfoZ',
        name: 'courseInfoZ',
        component: () =>
            import('@/views/ZViews/course/courseInfo.vue')
    },
    {
        path: '/search',
        name: 'search',
        component: () =>
            import('@/views/ZViews/search/search.vue')
    },
    {
        path: '/login',
        component: () =>
            import("../views/login/Login.vue")
    }, {
        path: '/register',
        component: () =>
            import("../views/register/Register.vue")
    }, {
        path: '/forget',
        component: () =>

            import("../views/forget/Forget.vue")
    },
    {
        path: '/gerenzhuye',
        component: () =>
            import("../views/gerenzhuye/Gerenzhuye.vue"),
    }, {
        path: '/gerenxiugai',
        component: () =>
            import("../views/gerenxiugai/Gerenxiugai.vue"),
    }, {
        path: '/dakazhuye',
        component: () =>
            import("../views/dakazhuye/Dakazhuye.vue"),

    }, {
        path: '/daka',
        redirect: "/daka/dakazhibo",
        component: () =>
            import("../views/daka/Daka.vue"),
        children: [{
            path: '/daka/dakazhibo',
            component: () =>
                import( /* webpackChunkName: "about" */ '../views/daka/Dakazhibo.vue')
        }, {
            path: '/daka/remendaka',
            component: () =>
                import( /* webpackChunkName: "about" */ '../views/daka/Remendaka.vue')
        }],
    },
    {
        path: '/zhibodetail',
        name: 'zhibodetail',
        component: () =>

            import("@/views/daka/Zhibodetail.vue")

    },
    {
        path: '/homeZ',
        name: 'homeZ',
        component: () =>
            import('@/views/ZViews/home/home.vue')
    },




    {
        path: '/course',
        name: 'course',
        component: () =>
            import('@/views/course/course.vue')
    },

    {
        path: '/community',
        component: () =>

            import( /* webpackChunkName: "about" */ '../views/community/Community.vue'),
        redirect: "/community/zuopin",
        children: [{
            path: '/community/zuopin',
            component: () =>
                import( /* webpackChunkName: "about" */ '../views/community/components/Zuopin.vue')
        }],
    },
    {
        path: '/community/zuopinmore',
        component: () =>
            import( /* webpackChunkName: "about" */ '../views/community/ZuoPinMore.vue'),
        meta: {
            keepalive: false,
        },
    },
    {
        path: '/fabu',
        component: () =>

            import( /* webpackChunkName: "about" */ '../views/community/Fabu.vue')
    },
    {
        path: '/wodeceshi',
        name: 'wodeceshi',
        component: () =>
            import("../views/wodeceshi/Wodeceshi.vue")

    }


]
const router = new VueRouter({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes,
    scrollBehavior(to, from, savedPosition) {
        return { x: 0, y: 0 }
    }
})

export default router